/**
 * sdk管理
 */
var Sdk = {};
/**
 * 注册微信sdk
 */
Sdk.registerWeChat = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerWeChat');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerWeChat', '()V');
    }
};

/**
 * 注册微信sdk
 * @param{String} appId 微信appid
 */
Sdk.registerWeChatByAppId = function (appId) {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerWeChatByAppId:', appId);
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerWeChatByAppId', '(Ljava/lang/String;)V', appId);
    }
};

// Sdk.js
Sdk.requestAllPermission = function () {
    // console.log('请求所有的权限Sdk.requestAllPermission');
    if (cc.sys.os === cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'requestAllPermission', '()V');
    }
};

/**
 * 注册魔窗sdk
 */
Sdk.registerMagicWindow = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerMagicWindow');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerMagicWindow', '()V');
    }
};
/**
 * 注册闲聊sdk
 */
Sdk.registerXianLiao = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerXianLiao');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerXianLiao', '()V');
    }
};
/**
 * 注册声网sdk
 */
Sdk.registerAgora = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerAgora');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerAgora', '()V');
    }
};
/**
 * 注册qq sdk
 */
Sdk.registerQQ = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerQQ');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerQQ', '()V');
    }
};
/**
 * 注册钉钉sdk
 */
Sdk.registerDingTalk = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerDingTalk');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerDingTalk', '()V');
    }
};
/**
 * 注册聊呗sdk
 */
Sdk.registerLiaoBe = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerLiaoBe');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerLiaoBe', '()V');
    }
};
/**
 * 注册云信sdk
 */
Sdk.registerNIM = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerNIM');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerNIM', '()V');
    }
};
/**
 * 注册太极盾sdk
 */
Sdk.registerTaiJi = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerTaiJi');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerTaiJi', '()V');
    }
};
/**
 * 注册阿里云推送sdk
 */
Sdk.registerAliPush = function () {
    if (cc.sys.os == cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerAliPush');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerAliPush', '()V');
    }
};

/**
 * 注册百度地图
 */
Sdk.registerBaiDu = function () {
    if (cc.sys.os === cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerBaiDu');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        // jsb.reflection.callStaticMethod(packageUri + "/utils/Sdk", "registerAliPush", "()V");
    }
};

Sdk.registerBaiDuByAk = function (appKey) {
    if (cc.sys.os === cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerBaiDuByAk:', appKey);
    }
};


/**
 * 注册高德地图
 */
Sdk.registerGaoDe = function () {
    if (cc.sys.os === cc.sys.OS_IOS) {
        jsb.reflection.callStaticMethod('Sdk', 'registerGaoDe');
    } else if (cc.sys.os == cc.sys.OS_ANDROID) {
        // jsb.reflection.callStaticMethod(packageUri + "/utils/Sdk", "registerAliPush", "()V");
    }
};

/**
 * 注册bugly
 * */
Sdk.registerBugly = function () {
    if (cc.sys.os == cc.sys.OS_ANDROID) {
        jsb.reflection.callStaticMethod(packageUri + '/utils/Sdk', 'registerBugly', '()V');
    }
};